import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import 'amfe-flexible/index'
import './assets/css/font-awesome.css'
import 'reset-css'
import '@/assets/common.less'
import {Tabbar,TabbarItem,Search,Swipe,SwipeItem,Grid,GridItem,NoticeBar,Tab,Tabs,Form,Field,Button,Dialog,Toast,Icon,GoodsAction,GoodsActionButton,GoodsActionIcon, Pagination,Sku,AddressEdit,Area,Card,Checkbox, CheckboxGroup, Empty,AddressList, SubmitBar,ContactCard,Badge,CountDown  } from 'vant';
import 'vant/lib/index.css'
import Axios from 'axios'



Vue.config.productionTip = false

Vue.use(Tabbar).use(TabbarItem);
Vue.use(Search);
Vue.use(Swipe).use(SwipeItem);
Vue.use(Grid).use(GridItem).use(NoticeBar);
Vue.use(Tab).use(Tabs);
Vue.use(Form).use(Field).use(Button);
Vue.use(Dialog).use(Toast);
Vue.use(Icon);
Vue.use(GoodsAction);
Vue.use(GoodsActionButton);
Vue.use(GoodsActionIcon);
Vue.use(Pagination);
Vue.use(Sku);
Vue.use(AddressEdit);
Vue.use(Area);
Vue.use(Card);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Empty);
Vue.use(AddressList);
Vue.use(SubmitBar);
Vue.use(ContactCard);
Vue.use(Badge);
Vue.use(CountDown);

if (window.localStorage.getItem('token')) {
  Axios.defaults.headers.common['Authorization'] = `Bearer ` + window.localStorage.getItem('token')
}
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
